<html>

<body style="font-family: Trebuchet MS">
<h1>Setting Client-Id</h1>

<p>
The current cookies are:
<br>
<span id="CURRENTCOOKIES"></span>
</p>

<p>
Path for which cookie is defined: <input id="AREA" type="text">
<br>
Set new eclnt-id cookie value: <input id="CLIENTID" type="text">
<br>
<br>
<br>
<input type="button" value="Set Cookie" onclick="cStoreCookie();">
</p>

</body>

</html>

<script>
cRefreshSpan();
function cStoreCookie()
{
    var vNewClientId = document.getElementById("CLIENTID").value;
    var vArea = document.getElementById("AREA").value;
    var vExpires = new Date();
    vExpires = new Date(vExpires.getTime() + 50000 * 24 * 60 * 60 * 1000);
    document.cookie = "eclnt-id=" + vNewClientId+";path=/"+vArea+"/;expires="+vExpires.toGMTString();
    cRefreshSpan();
    alert("Client id was set.\nCookie's expiration: " + vExpires.toGMTString());
}
function cRefreshSpan()
{
	var vCookieContent = document.cookie;
    document.getElementById("CURRENTCOOKIES").innerHTML = vCookieContent;
}
</script>